[BLKTAP] avoid race between tapdisk and xvd daemon with ufe_ring.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Nov 2006 11:14:52 +0000 (11:14 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Nov 2006 11:14:52 +0000 (11:14 +0000)
commitc58282c9f41489fc758455ab0e76aac27a0c4f30
tree5f3542c37d86ad5f595c0fcc72c2be4cac4a0bff
parent720860012a8cdeeb5bf810b767f30c1d4cc0a9c7
[BLKTAP] avoid race between tapdisk and xvd daemon with ufe_ring.
- Tapdisk updates rsp_cons by ioctl(). on the other hand xvd daemon
  reads rsp_cons in do_block_io_op() with RING_FULL().
  Copy request and memory barrier before updating rsp_cons.
- Tapdisk access req_prod_pvt with select(). on the other hand xvd
  daemon updates it in do_block_io_op().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c